﻿using System.ComponentModel.DataAnnotations;

namespace RndMaterialDisposalService.Models
{
    public class OutsourcingProcessingReportFormModel
    {
        [Key]
        [Ganss.Excel.Ignore]
        public Guid? Key { get; set; }
        [Ganss.Excel.Column(1, "单号")]
        public string? ApplicationNumber { get; set; }
        [Ganss.Excel.Ignore]
        public string? ProcInstId { get; set; }
        [Ganss.Excel.Ignore]
        public string? ApplicantEmployeeNumber { get; set; }

        [Ganss.Excel.Ignore]
        public string? ApplicantName { get; set; }
        [Ganss.Excel.Column(2, "申请日期")]
        public DateTime? CreateDate { get; set; }
        [Ganss.Excel.Column(3, "申请人")]
        public string? DcApplicantName => $"{ApplicantEmployeeNumber} {ApplicantName}";
        [Ganss.Excel.Column(9, "流程状态")]
        public string? CurrentStatus { get; set; }
        [Ganss.Excel.Column(4, "加工类型")]
        public string? ProcessingType { get; set; }
        [Ganss.Excel.Column(5, "任务令/PO号")]
        public string? TaskOrderPO { get; set; }
        [Ganss.Excel.Column(6, "任务令数量")]
        public string? TaskOrderCount { get; set; }
        [Ganss.Excel.Column(7, "产品编码")]
        public string? TaskProductCode { get; set; }
        [Ganss.Excel.Ignore]
        public bool? IsMaterialKitting { get; set; }
        [Ganss.Excel.Column(8, "物料是否齐套")]
        public string? DcIsMaterialKitting => IsMaterialKitting == null ? "" : IsMaterialKitting == true ? "是" : "否";
        [Ganss.Excel.Ignore]
        public string? FatherProcInstId { get; set; }
    }
}
